using UnityEngine;
using System.Collections;

/**
 * Script of Animation display management (Prelevel screen).
 * The purpose of this class is to launch level after animation.
 * @author Benjamin Bruneau
 */
public class PrelevelScript : MonoBehaviour {
	
	public string _forward; // Level to launch
	
	/**
	 * Called once per frame.
	 * @return void
	 */
	void Update () {
	
		// If animation over, launch level
		if (!this.GetComponent<Animation>().isPlaying)
		{
			
			Application.LoadLevel(_forward);
			
		}
		
	}
}
